package com.hutu.scoring;

import com.hutu.model.entity.AccountAnswer;
import com.hutu.model.entity.App;
import com.hutu.model.enums.AppTypeEnum;

import javax.annotation.PostConstruct;
import java.util.List;

/**
 * 策略接口
 */

public abstract class ScoringStrategy {

    public abstract AccountAnswer doScore(List<String> choices, App app) throws Exception;

    public abstract AppTypeEnum getAppTypeEnum();

    @PostConstruct
    private void init() {
        ScoringFactory.register(getAppTypeEnum().getType(), this);
    }
}
